﻿using ServiceBus.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace TestDemoRecv
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            while (true)
            {
                //var result = SendMessageProvider.ReceiveMessage();
                //if (result == null)
                //{
                //    Console.WriteLine("...second circle find...no data!");
                //}
                //else
                //{
                //    {
                //        Console.WriteLine(result);
                //    }
                //}
                var result = SendMessageProvider.ReceiveMessage<TestModel>();
                if (result != null)
                {
                    Console.WriteLine("name:{0}===sex:{1}", result.name, result.sex);
                }
                else
                {
                    Console.WriteLine("...second circle find...no data!");
                }
            }
            Console.ReadLine();
        }
    }
}